package src.main.java.org.io;

import java.io.DataOutputStream;
import java.io.FileOutputStream;

/*
 DataOutputStream(数据输出流)
 */
public class Test14 {
    public static void main(String[] args) {
        try (
                DataOutputStream dataOutputStream = new DataOutputStream(new FileOutputStream("E:\\JavaLearn\\javaCode\\src\\test8.txt"))
        ) {
            dataOutputStream.writeInt(97);
            dataOutputStream.writeDouble(99.6);
            dataOutputStream.writeBoolean(true);
            dataOutputStream.writeUTF("我爱你");
        }catch (Exception e){
            e.printStackTrace();
        }
    }
}
